package codegen.glsl;

import codegen.ui.nbvisual.visual.CodeGenGraphScene;
import codegen.graphnetwork.model.*;

public class GLSLCodeGeneration {

    CodeGenGraphScene graph;
    String fragmentShader;
    String vertexShader;
    public GLSLCodeGeneration(CodeGenGraphScene graph) {
        this.graph = graph;
    }

    //Graph graph;
    public void codeGen() {
        // travel the graph
        
        graph.getStartNode();
        
        
        // for each Node
        // resolve the changed/ unupdated Nodes
        // from End Node , pull results
        // compose Node syntax
        // compute Node result
        // display result if preview is true?
    }

    public void update() {
        //codeGen()
    }

    public void getResultSyntax(Node aNode){
        //graph.getPins();
        
        // resovle inputs
        // that mean get the linked output result,
        
        // that mean force the linked Node to resovle its self...
        // recursively!
        // after Done. mark the Node RESOVLED.
    }
    
    public CodeGenGraphScene getGraph() {
        return graph;
    }

    public void setGraph(CodeGenGraphScene graph) {
        this.graph = graph;
    }

    public String getFragmentShader() {
        return fragmentShader;
    }

    public String getVertexShader() {
        return vertexShader;
    }
    
    
}
